<template>
  <div>
    <h1>app count: {{ $store.state.counter.count }} - {{ count }}</h1>
    <button @click="$store.dispatch('counter/increment')">+</button>
    <button @click="increment">+</button>
    <button>-</button>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";

export default {
  name: "App",
  computed: {
    ...mapState("counter", ["count"]),
  },
  methods: {
    ...mapActions("counter", ["increment"]),
  },
};
</script>

<style></style>
